/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sv.edu.ues.fia.appserviciosocial.entidad;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Rodrigo
 */
@Entity
@Table(name = "solicitante")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Solicitante.findAll", query = "SELECT s FROM Solicitante s")})
public class Solicitante implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDSOLICITANTE")
    private Integer idsolicitante;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDINSTITUCION")
    private int idinstitucion;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDCARGO")
    private int idcargo;
    @Size(max = 100)
    @Column(name = "NOMBRE")
    private String nombre;
    @Size(max = 8)
    @Column(name = "TELEFONO")
    private String telefono;
    @Size(max = 100)
    @Column(name = "CORREO_ELECTRONICO")
    private String correoElectronico;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "PATH")
    private String path;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fechaact")
    @Temporal(TemporalType.DATE)
    private Date fechaact;

    public Solicitante() {
    }

    public Solicitante(Integer idsolicitante) {
        this.idsolicitante = idsolicitante;
    }

    public Solicitante(Integer idsolicitante, int idinstitucion, int idcargo, String path, Date fechaact) {
        this.idsolicitante = idsolicitante;
        this.idinstitucion = idinstitucion;
        this.idcargo = idcargo;
        this.path = path;
        this.fechaact = fechaact;
    }

    public Integer getIdsolicitante() {
        return idsolicitante;
    }

    public void setIdsolicitante(Integer idsolicitante) {
        this.idsolicitante = idsolicitante;
    }

    public int getIdinstitucion() {
        return idinstitucion;
    }

    public void setIdinstitucion(int idinstitucion) {
        this.idinstitucion = idinstitucion;
    }

    public int getIdcargo() {
        return idcargo;
    }

    public void setIdcargo(int idcargo) {
        this.idcargo = idcargo;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getCorreoElectronico() {
        return correoElectronico;
    }

    public void setCorreoElectronico(String correoElectronico) {
        this.correoElectronico = correoElectronico;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Date getFechaact() {
        return fechaact;
    }

    public void setFechaact(Date fechaact) {
        this.fechaact = fechaact;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idsolicitante != null ? idsolicitante.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Solicitante)) {
            return false;
        }
        Solicitante other = (Solicitante) object;
        if ((this.idsolicitante == null && other.idsolicitante != null) || (this.idsolicitante != null && !this.idsolicitante.equals(other.idsolicitante))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sv.edu.ues.fia.appserviciosocial.entidad.Solicitante[ idsolicitante=" + idsolicitante + " ]";
    }
    
}
